import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建日期',
    align: "center",
    dataIndex: 'createTime'
  },
  {
    title: '标题',
    align: "center",
    dataIndex: 'title'
  },
  {
    title: '简述',
    align: "center",
    dataIndex: 'resume'
  },
  {
    title: '附件',
    align: "center",
    dataIndex: 'file',
  },
  {
    title: '是否展示 0.否 1.是',
    align: "center",
    dataIndex: 'isDisplay',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'1'},{text:'否',value:'0'}]);
     },
  },
];

// 高级查询数据
export const superQuerySchema = {
  createTime: {title: '创建日期',order: 0,view: 'datetime', type: 'string',},
  title: {title: '标题',order: 1,view: 'text', type: 'string',},
  resume: {title: '简述',order: 2,view: 'textarea', type: 'string',},
  file: {title: '附件',order: 4,view: 'file', type: 'string',},
  isDisplay: {title: '是否展示 0.否 1.是',order: 5,view: 'number', type: 'number',},
};
